<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>济宁消防人员人员出入管理系统</title>
<link rel="stylesheet" href="themes/default/easyui.css" />
<link rel="stylesheet" href="themes/icon.css" />
<link rel="stylesheet" href="css/main.css" />
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.easyui.min.js"></script>
</head>
<body class="easyui-layout">
	<div id="content" data-options="region:'center'">
		<div class="ftitle">修改密码</div>
		<form action="user/changePwd" method="post" id="changePwd_form">
			<table style="margin: 0 auto;">
				<tbody>
					<tr>
						<td>旧密码:</td>
						<td><input type="password" name="pwd"
							class="easyui-validatebox" required="required"></td>
					</tr>
					<tr>
						<td>新密码:</td>
						<td><input id="planPwd" type="password" name="planPwd"
							class="easyui-validatebox" required="required"></td>
					</tr>

					<tr>
						<td>重复新密码:</td>
						<td><input id="rplanPwd" type="password"
							class="easyui-validatebox" required="required"></td>
					</tr>
					<tr>
						<td><a href="javascript:changePwd();"
							class="easyui-linkbutton" data-options="iconCls:'icon-save'">保存</a>
						</td>
					</tr>
				</tbody>
			</table>
		</form>
		<script type="text/javascript">

			function changePwd() {
				var planPwd=$('#planPwd').val();
				var rplanPwd=$('#rplanPwd').val();
				if(planPwd!=rplanPwd){
					$.messager.alert('错误提示','两次输入的密码不一致。', 'error');
					return;
				}
				var form = $('#changePwd_form').form('submit', {
					success : function(data) {
						data = $.parseJSON(data);
						if (data.success) {
							showMsg("密码修改成功。");
						} else {
							$.messager.alert('错误提示', data.message, 'error');
						}
					}

				});
			}
		</script>
	</div>
</body>
</html>
